package org.swift.commons.client;

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;

public class HttpInputStream extends MeasuredInputStream {
			
	private HttpURLConnection conn;
	
	public HttpInputStream(HttpURLConnection conn,
			InputStream inputStream) {
		super(conn.getContentLength(), inputStream);
		this.conn = conn;		
	}
	
	public long size() {
		return super.size();
	}
	
	public String getContentType() {
		return conn.getContentType();
	}

	public String getContentEncoding() {
		return conn.getContentEncoding();		
	}
	
	public URL getUrl() {
		return conn.getURL();
	}
	
	public int getResponseCode() throws IOException {
		return conn.getResponseCode();
	}
	
}
